package com.njwb.day03;

import java.util.Arrays;

public class Test17 {
    public static void main(String[] args) {
        //二维数组
        int[][] arr=new int[4][5];
        //长度
        System.out.println(arr.length);
        //赋值
        arr[0][0]=10;
        arr[2][2]=100;
        //获取内层数组的数据
        int i=arr[0][0];
        System.out.println(i);
        System.out.println(arr[0]);
        System.out.println(arr[1]);
        System.out.println(arr[2]);
        System.out.println(arr[3]);
        System.out.println(Arrays.toString(arr[0]));
        System.out.println(Arrays.toString(arr[1]));
        System.out.println(Arrays.toString(arr[2]));
        System.out.println(Arrays.toString(arr[3]));
        //遍历
        for(int x=0;x<arr.length;x++){
            //获取内层数组
            int[] a=arr[x];
            //System.out.println(Node);
            for(int y=0;y<arr[x].length;y++){
                System.out.print(arr[x][y]+" ");
            }
            System.out.println();
        }

    }
}
